package com.day23.Runnable;

public class RunnableDemo {
    public static void main(String[] args) {
        startThread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName() + "线程启动了");
            }
        });
        startThread(()->{
            System.out.println(Thread.currentThread().getName() + "线程启动了");
        });
        }
        private static void startThread(Runnable runnable){
            new Thread(runnable).start();
        }
}
